<?php
namespace Mob \ Controller;

use Think \ Controller;
use Think \ Hook;

class EnterpriseController extends BaseController {

     public function index()
     {
    $this->display();

     }

     public function addToEnterprise()
     {
     $name = I('post.name',null,'string');
     $imgpath = I('post.imgpath',null,'string');
     $industry = I('post.industry',null,'string');
     $grade = I('post.grade',null,'string');
     $intro = I('post.intro',null,'string');
     $enterprise = D('Enterprise');
     $res = $enterprise->creator($name,$imgpath,$industry,$grade,$intro);
     if($res)
     {
     $data = array('status'=>1,'msg'=>'操作成功!');
     }else
     {
     $data = array('status'=>0,'msg'=>'操作失败!');
     }
     $this->ajaxReturn($data);
     //creator($name,$imgpath,$industry,$grade,$intro)
     }


    public function upload(){
    $enterprise = D('UploadFile');
   $res =  $enterprise->load();
    $this->ajaxReturn($res);
     }











}



